<template>
  <div class="demo">
    <div class="demo-title">获得选项的文本</div>
    <div class="demo-content">
      <Select
        v-model:value="value"
        label-in-value
        style="width: 120px"
        :options="options"
        @change="handleChange"
      />
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue';
  import Select from '@sscd/select';
  import type { SelectProps } from '@sscd/select';
  const value = ref({ value: 'lucy' });
  const options = ref<SelectProps['options']>([
    { value: 'jack', label: 'Jack (100)' },
    { value: 'lucy', label: 'Lucy (101)' },
  ]);
  const handleChange: SelectProps['onChange'] = (val) => console.log('handleChange', val);
</script>
